<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
 request.setCharacterEncoding("UTF-8");
%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>岗位管理</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  
   <script type="text/javascript">
	function updatepost(){
	var url="<%=request.getContextPath() %>/servlet/PostServlet?PosterAll=1";
				location.href=url;		
	}
	
	
	function tiaozhuanadd(){
	var url="<%=request.getContextPath() %>/Post/addPost.jsp";
				location.href=url;	
	}
	
	function selectall(){
		var url="<%=request.getContextPath() %>/servlet/PostServlet?PosterAll=1";
				location.href=url;	
	}
	function returnMain(){
	   var url="<%=request.getContextPath() %>/Post/Main.jsp";
				location.href=url;	
	}
	
	function Gocheck(){
	//编号为数字！！
	
	}
	
	function selectType(){
	var url="<%=request.getContextPath() %>/servlet/PostServlet?selectType=1";
				location.href=url;	
	}
	</script>
  
  
  <body>
  

  <section id="selectCustomer_area" class="section_padding selectCustomer_area">
		<div class="container">	
			<div class="row prject_area_title wow  rollIn ">
				<div class="col-md-12 contact_a_title  wow  rollIn ">
					<h2><span>岗位信息主页面</span></h2>				
				</div>
			</div>
  	<form action="<%=request.getContextPath()%>/servlet/PostServlet?selectByValue=1" method="post">
 编号<input name="p_id" type="text" /> 名称<input name="p_name"
			type="text" /> 类型<select name="p_type">
			<option value="0"></option>
			<option value="1">管理</option>
  	        <option value="2">技术</option>
  	        <option value="3" >营销</option>
        	<option value="4" >市场</option>
		</select> 
  	
  		<input type="submit" value="确认查询" class="btn" oncleck="return Gocheck()">
  		
  	<br/>
  	

 
  	
 <table border="2" cellpadding="0" cellspacing="0" bordercolor="#337ab7" id="senfe" width="100%"> 
<thead> 
	<tr align="center" valign="middle"> 
	<th width="46" height="50" bgcolor="#FFFFFF" id="fen">岗位编号</th> 
	<th width="81" bgcolor="#FFFFFF" id="fen">岗位名称</th> 
	<th width="73" bgcolor="#FFFFFF" id="fen">岗位类型</th> 
	<th width="73" bgcolor="#FFFFFF" id="fen">岗位编制</th> 

	<th width="90" bgcolor="#FFFFFF" id="fen">操作</th> 
	</tr> 
</thead> 
<tbody id="group_one"> 
<c:forEach items="${allPost}" var="item">
 
            <tr align="center">
                <td> <div>${item.p_id }</div> </td> 
                  <td> <div>${item.p_name }</div> </td>
                <td> <div>${item.p_type }</div> </td> 
                   <td> <div>${item.p_compilation }</div> </td>
              
    
     <td>
		<div><br/>
  
       <input type="button" value="修改" class="btn" onclick="location.href='<%=request.getContextPath() %>/servlet/PostServlet?editState=1&id=${item.p_id}'">
  
    	<input type="button" value="删除" class="btn" onclick="if(window.confirm('您确定要删除吗？')){location.href='<%=request.getContextPath() %>/servlet/PostServlet?deleteState=1&id=${item.p_id}';}else{location.href='<%=request.getContextPath() %>/servlet/PostServlet?PosterAll=1';}"></br>
 
		
		<br/></div>    
    </td>
    </tr>
    
    </c:forEach>
</table>  	



  	 
   
  
	</section>
  
   
    <input type="button" class="btn" value="增加岗位" onClick="tiaozhuanadd()">
    <input type="button" class="btn" value="返回主菜单" onClick="returnMain()">

    
  </body>
</html>
